package cn.young.javalearning.designpattern.factorypattern.f_abstractfactory;

import cn.young.javalearning.designpattern.factorypattern.bean.f_bean.Apple;
import cn.young.javalearning.designpattern.factorypattern.bean.f_bean.Canned;

public class Main {
    public static void main(String[] args) {
        AbstractFactoryBean abstractFactoryBean = new AbstractFactoryBean();
        Apple apple = (Apple) abstractFactoryBean.produceFruit();
        apple.setColor("green");
        apple.setSize("middle");
        apple.pickFruit();

        Canned canned = abstractFactoryBean.produceCanned();
        canned.boil();
    }
}
